﻿using IOCDemo.Domain;
using IOCDemo.Interfaces;

namespace IOCDemo.Services
{
    public class MockAuditService : IAuditService
    {
        private readonly ILoggingService loggingService;

        public MockAuditService(ILoggingService loggingService)
        {
            this.loggingService = loggingService;
        }

        #region Implementation of IAuditService

        public void RecordTransaction(Transaction transaction)
        {
            loggingService.Info(string.Format("Recording transaction from account {0} to account {1} for amount {2}.",
                                              transaction.FromAccount.Name, transaction.ToAccount.Name,
                                              transaction.Amount));
        }

        #endregion
    }
}